import { Outlet, useNavigate } from "react-router-dom";
export default function Page2() {
  const navigate = useNavigate();
  return (
    <div>
      page2
      <div>以下是孩子</div>
      <button
        onClick={() => {
          navigate("/page1?a='hi", {
            state: {
              hi: "你好呀",
            },
          });
        }}
      ></button>
      <Outlet></Outlet>
    </div>
  );
}
